import time

# from scipy import optimize as op
# import numpy as np
# c=np.array([2,3,-5])
# A_ub=np.array([[-2,5,-1],[1,3,1]])
# B_ub=np.array([-10,12])
# A_eq=np.array([[1,1,1]])
# B_eq=np.array([7])
# x1=(0,7)
# x2=(0,7)
# x3=(0,7)
#
# res=op.linprog(-c,A_ub,B_ub,A_eq,B_eq,bounds=(x1,x2,x3))
# print(res)


print(time.time())
start = time.time()
for a in range(0, 1001):
    for b in range(0, 1001):
        c = 1000 - a - b
        if a ** 2 + b ** 2 == c ** 2:
            print("a, b, c:%d, %d, %d" % (a, b, c))
end = time.time()
print(time.time())
print("耗时：%f"%(end - start))
